package com.heima.wemedia.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.wemedia.dtos.NewsAuthDTO;
import com.heima.model.wemedia.pojo.WmNews;
import com.heima.model.wemedia.vos.WmNewsVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author by jojo
 * @Date 2022/3/2
 * @Description
 */
public interface WmNewsMapper extends BaseMapper<WmNews> {
    /**
     * 关联查询wm_user表和wm_news把作者和文章查出来
     * @param dto
     * @return
     */
    List<WmNewsVO> findListAndPage(@Param("dto") NewsAuthDTO dto);


    long findListCount(@Param("dto") NewsAuthDTO dto);
}
